package com.lxk.mall.pms.domain.bo.spu;

import com.lxk.mall.pms.domain.PmsProductSpu;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * 商品spu业务对象 pms_product_spu
 *
 * @author Lion Li
 * @date 2024-06-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PmsProductSpu.class, reverseConvertGenerate = false)
public class PmsProductSpuBo extends BaseEntity {

    /**
     * 商品 SPU 编号，自增
     */
    @NotNull(message = "商品 SPU 编号，自增不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 商户id
     */
    private Long merId;

    /**
     * 商品类型
     */
    private String productType;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 关键字
     */
    @NotBlank(message = "关键字不能为空", groups = { AddGroup.class, EditGroup.class })
    private String keyword;

    /**
     * 商品简介
     */
    @NotBlank(message = "商品简介不能为空", groups = { AddGroup.class, EditGroup.class })
    private String introduction;

    /**
     * 商品详情
     */
    @NotBlank(message = "商品详情不能为空", groups = { AddGroup.class, EditGroup.class })
    private String description;

    /**
     * 商品分类编号
     */
    @NotNull(message = "商品分类编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long categoryId;

    /**
     * 商品品牌编号
     */
    @NotNull(message = "商品品牌编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long brandId;

    /**
     * 商品封面图
     */
    @NotBlank(message = "商品封面图不能为空", groups = { AddGroup.class, EditGroup.class })
    private String picUrl;

    /**
     * 商品轮播图地址
 数组，以逗号分隔
 最多上传15张
     */
    @NotBlank(message = "商品轮播图地址数组，以逗号分隔最多上传15张不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sliderPicUrls;

    /**
     * 排序字段
     */
    @NotNull(message = "排序字段不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sort;

    /**
     * 商品状态: 1 上架（开启） 0 下架（禁用） -1 回收
     */
    @NotNull(message = "商品状态: 1 上架（开启） 0 下架（禁用） -1 回收不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 规格类型：0 单规格 1 多规格
     */
    @NotNull(message = "规格类型：0 单规格 1 多规格不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer specType;

    /**
     * 商品价格，单位使用：分
     */
    @NotNull(message = "商品价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 市场价，单位使用：分
     */
    @NotNull(message = "市场价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal marketPrice;

    /**
     * 成本价，单位： 分
     */
    @NotNull(message = "成本价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal costPrice;

    /**
     * 库存
     */
    @NotNull(message = "库存不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer stock;

    /**
     * 配送方式数组
     */
    @NotBlank(message = "配送方式数组不能为空", groups = { AddGroup.class, EditGroup.class })
    private List<Integer> deliveryTypes;

    /**
     * 物流配置模板编号
     */
    @NotNull(message = "物流配置模板编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deliveryTemplateId;

    /**
     * 赠送积分
     */
    @NotNull(message = "赠送积分不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long giveIntegral;

    /**
     * 分销类型
     */
    @NotNull(message = "分销类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer subCommissionType;

    /**
     * 商品销量
     */
    @NotNull(message = "商品销量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long salesCount;

    /**
     * 虚拟销量
     */
    @NotNull(message = "虚拟销量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long virtualSalesCount;

    /**
     * 商品点击量
     */
    @NotNull(message = "商品点击量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long browseCount;

    private Integer tabType;



}
